package com.huaxiafinance.management.mapper;

import com.huaxiafinance.management.dto.request.QuerySupplierList;
import com.huaxiafinance.management.model.MallProduct;
import com.huaxiafinance.management.model.MallSupplier;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface MallSupplierMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(MallSupplier record);

    int insertSelective(MallSupplier record);

    MallSupplier selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(MallSupplier record);

    int updateByPrimaryKey(MallSupplier record);
    String selectSupCode();
    Integer selectIdByCode(@Param("code") String code);

    List<Map> querySupplierList(QuerySupplierList dto);

    Integer countSupplierList(QuerySupplierList dto);

    /**
     * 通过供货商查除对应的商品
     * @param id
     * @return
     */
    List<MallProduct> selectMallProBySupp(@Param("id") Integer id);
    int updateByIdSelective(MallSupplier record);

    /**
     * 查出供应商对应的银行卡id
     * @param id
     * @return
     */
    Integer selectBankIdBySuppId(@Param("id") Integer id);

    List<Map> queryNameList(@Param("state")Integer state);

    Map queryRepeatName(@Param("supplierName")String supplierName);

    /**
     * 查询是合伙人供应商的个数
     * @return
     */
    Integer countIdByIsPartner();
}